<? startScript('jquery'); ?><script type="text/javascript">
	jQuery(function($) { $("ul.jt-tabs").tabs("div.jt-panes > div"); });
</script><? endScript(); ?>

<form action="" method="post" enctype="multipart/form-data">

<? if (sizeof($DIAGS)) { ?>
	<div class="diags"><p><?=implode("</p><p>", $DIAGS)?></p></div>
<? } ?>


<ul class="jt-tabs"><?

	foreach($DATA['langs'] as $lang) {
		?><li><a href="#<?=$lang['text']?>"><?=$lang['assoc']?></a></li><? 
	} 
	
?></ul>

<div class="jt-panes">

	<? $t = true; 
		foreach($DATA['langs'] as $lang) { $l = $lang['text'];

		?><div class="jt-pane" style="<?=$t ? "display:block" : ""?>">

			<p><label>Название<br />
				<input type="text" class="xwide" name="title[<?=$l?>]" value="<?=hdat('object', 'data', $l, 'title')?>" /></label>
			</p>

			<p><label>Уникальный ID<br />
				<input type="text" class="xwide" name="article[<?=$l?>]" value="<?=hdat('object', 'data', $l, 'article')?>" /></label>
			</p>

			<p><label>Описание
				<textarea name="body[<?=$l?>]" cols="80" rows="25"><?=dat('object', 'data', $l, 'body')?></textarea></label>
			</p>


		</div><? 
	
	$t = false; } ?>

</div>



<div>
	<fieldset>
		<legend> = </legend>

<? /*		<p><label>Цена<br />
			<input type="text" class="xwide" name="price" value="<?=hdat('object', 'price')?>" /></label>
		</p>
*/ ?>
		<div><label>Маленькая картинка (размер: <?=talkImageSize($s['w'], $s['h'])?>)<br />
			<input type="file" name="image" class="wide" /></label>
			<? if ($im = dat('object','image')) { ?>
				<div class="spaced"><img src="<?=$im['fn']?>" /></div>
			<? } ?>
		</div>

		<div><label>Большая картинка (размер: <?=talkImageSize($s['lw'], $s['lh'])?>)<br />
			<input type="file" name="image_large" class="wide" /></label>
			<? if ($im = dat('object','image_large')) { ?>
				<div class="spaced"><img src="<?=$im['fn']?>" /></div>
			<? } ?>
		</div>

	</fieldset>
</div>

<p><input type="submit" name="editor_save" value="Save" />
	<? if (!($DATA['object']['attr'] & AA_VISIBLE)) { ?><input type="submit" name="editor_save_enable" value="Save and Enable" /><? } ?>
</p>

</form>
